package com.romotc.json.tools;

import org.codehaus.jackson.map.ObjectMapper;

public class Jackson {

	private static ObjectMapper instance;
	public synchronized static ObjectMapper getObjectMaper() {
		if(instance == null)
			instance = new ObjectMapper();
		
		return instance;
	}
	
	
	public static StringBuilder appendStr(StringBuilder bld, String string) {
		bld.append("\"").append(string).append("\"");
		return bld;
		
	}

	public static StringBuilder appendValue(StringBuilder bld, String key, String value) {
		bld.append("\"").append(key).append("\":");
		bld.append("\"").append(value).append("\"");
		bld.append(",");
		return bld;
	}
}
